﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TienTeTuong
{
    public partial class SearchPage : System.Web.UI.Page
    {
        //  public List<CategoryDTO> lstCate = new List<CategoryDTO>();
        public List<CategoryDetailDTO> lstCateDetail = new List<CategoryDetailDTO>();
        CategoryDetailBUS cateDetailBUS = new CategoryDetailBUS();
        CategoryBUS cateBUS = new CategoryBUS();
        public int maxPerline;
        public int maxPerLineHot;
        public string cateID;
        public string cateName;
        public string keyword;
        // declare variable paging
        public int iTotalPage;
        public int iCurPage;
        public int iUpperPage;
        public int iLowerPage;
        public int iTotalResult;
        private int page;
        protected void Page_Load(object sender, EventArgs e)
        {
            cateID = Request.QueryString["cateid"];
            keyword = Request.QueryString["keyword"];
            string strPage = Request.QueryString["page"];
            page = Common.IsNumber(strPage) ? int.Parse(strPage) : 1;

            lstCateDetail = cateDetailBUS.SearchListCategoryByPage(cateID, keyword, page, Common.iNumItemPerPage,
                                                                   out iTotalPage,
                                                                   out iCurPage, out iLowerPage, out iUpperPage,
                                                                   out iTotalResult);

        }
    }
}